package com.benshou.bsoa.common.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;

// 基础业务异常
@Getter
public class BusinessException extends RuntimeException {
    private final String code;

    public BusinessException(String message) {
        super(message);
        this.code = String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR.value());
    }

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }
}